<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <link rel="stylesheet" type="text/css" href="/static/abe.css">
		<title>query</title>
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
		<script type="text/javascript">
			function submit(type){
				if (type === "address"){
					queryKey = $("#address").val();
					queryAddress = "/q/address/" + queryKey;
				}	
				else if (type === "blkhash"){
					queryKey = $("#blkhash").val();
					queryAddress = "/q/getblockbyhash/" + queryKey;
				}		
				else if (type === "blkheight"){
					queryKey = $("#blkheight").val();
					queryAddress = "/q/getblockbyheight/" + queryKey;
				}
				else if (type === "txhash"){
					queryKey = $("#txhash").val();
					queryAddress = "/q/gettradebytxhash/" + queryKey;
				}
				window.location = queryAddress;
			}
		</script>

	</head>

	<body>
		<div>
		<p>根据地址进行搜索</p>
        <p>
        	<input type="text" id="address" size="64" value="" />
        	<button type="button" onclick="submit('address')">搜索</button>
        </p>
        <p>根据blk_hash搜索</p>
        <p>
        	<input type="text" id="blkhash" size="64" value="" />
        	<button type="button" onclick="submit('blkhash')">搜索</button>
        </p>
        <p>根据blk_height搜索</p>
        <p>
        	<input type="text" id="blkheight" size="64" value="" />
        	<button type="button" onclick="submit('blkheight')">搜索</button>
        </p>
        <p>根据tx_hash搜索</p>
        <p>
        	<input type="text" id="txhash" size="64" value="" />
        	<button type="button" onclick="submit('txhash')">搜索</button>
        </p>
        
        
        </div>

	</body>
</html>
